
    /**  
    * @Title: CafeJobFactory.java
    * @Package com.efast.cafe.commponent.job.config
    * @Description: TODO(用一句话描述该文件做什么)
    * @author Administrator
    * @date 2018年9月13日
    * @version V1.0  
    */
    
package com.efast.cafe.commponent.job.config;

import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.AdaptableJobFactory;
import org.springframework.stereotype.Component;

/**
    * @ClassName: CafeJobFactory
    * @Description: TODO(这里用一句话描述这个类的作用)
    * @author Administrator
    * @date 2018年9月13日
    *
    */
@Component("cafeJobFactory")
public class CafeJobFactory extends AdaptableJobFactory{

	@Autowired
    private AutowireCapableBeanFactory capableBeanFactory;

    protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception {
        Object jobInstance = super.createJobInstance(bundle);
        capableBeanFactory.autowireBean(jobInstance);
        return jobInstance;
    }
}
